﻿using System;
using UnityEngine;
using UnityEngine.UI;

public class ObjectReferenceCustom : ObjectReference
{
    public Action<Button> DoButtonClick;
    protected override void OnButtonClick(GameObject sender)
    {
        Button btn = sender.GetComponent<Button>();
        if (btn == null)
        {
            Debug.LogWarning("绑定点击事件对象不含Button Componet，请检查：" + sender.gameObject);
        }
        if (DoButtonClick != null)
            DoButtonClick(btn);
    }

    // Use this for initialization
    protected override void Start () {
		base.Start();
	}

}
